##!/bin/bash 
#sum=5
#if [ $num -gt 10 ]; then
#    echo "数字大于10"
#elif [ $num -eq 5 ]; then
#    echo "数字等于5"
#else 
#    echo "数字小于5"
#fi


#num=15
#if [ $num -gt 10 ]; then
#    echo "数字大于 10"
#elif [ $num -eq 5 ]; then
#    echo "数字等于 5"
#else
#    echo "数字小于 5"
#fi

##!/bin/bash
#read -p "请输入一个颜色:" color
#case $color in
#	red)
#		echo "选择了红色"
#		;;
#	blue)
#		echo "选择了蓝色"
#		;;
#	green)
#		echo "选择的绿色"
#		;;
#	*)
#		echo "未知颜色"
#		;;
#esac

##!/bin/bash
#fruite=("apple" "banana" "cherry")
#for fruite in "${fruite[@]}"; do
#	echo "我喜欢吃 $fruite"
#done

##!/bin/bash
#for ((i=1; i<=5; i++)); do
#    echo "当前数字是 $i"
#done


##!/bin/bash
#i=1
#while [ $i -le 5 ]; do
#	echo "当前数字是 $i"
#	((i++))
#done

#!/bin/bash
while true; do
	read -p "请输入一个数字（输入0退出):" num
	if [ $num -eq 0 ]; then
		echo "退出程序"
		break
	fi
	echo "你输入的数字是:$num"
done


